Skip to content

Conversation

@Enselic
Copy link
Member

@Enselic Enselic commented Jan 17, 2026

So that pub-priv1.rs test does not have to (ab)use the aux-crate directive for this purpose. Which in turn makes it possible to make //@ no-prefer-dynamic actually not try to link dynamically. See #151257 and the test failure.

This is very edge-casey so I don't think we should document this in rustc-dev-guide. If someone needs to do this they will look at the code and easily find the functionality.

This is a bit hacky since --extern priv:pm.rs is not valid, but we can make our directives work however we want. And I think this is a fine pragmatic balance. Doing it "the right way" would be a lot of work for not much gain. Plus, that work can be done incrementally in small steps in the future if needed and wanted.

Unblocks:

@rustbot rustbot added A-compiletest Area: The compiletest test runner A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jan 17, 2026
@rust-log-analyzer

This comment has been minimized.

So that `pub-priv1.rs` test does not have to (ab)use the aux-crate
directive for this purpose.

This is very edge-casey so I don't think we should document this in
rustc-dev-guide. If someone eneds to do this they will look at the code
and easily find the functionality.

This is a bit hacky since `--extern priv:pm.rs` is not valid, but we can
make our directives work however we want. And I think this is a fine
pragmatic balance. Doing it "the right way" would be a lot of work for
not much gain. Plus, that work can be done incrementally in small steps
in the future.
@Enselic Enselic marked this pull request as ready for review January 17, 2026 21:01
@rustbot
Copy link
Collaborator

rustbot commented Jan 17, 2026

Some changes occurred in src/tools/compiletest

cc @jieyouxu

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jan 17, 2026
@rustbot
Copy link
Collaborator

rustbot commented Jan 17, 2026

r? @Zalathar

rustbot has assigned @Zalathar.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@Zalathar
Copy link
Member

I feel like I’m missing a lot of context here.

It’s very unclear to me what the new directive syntax is doing, or why.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-compiletest Area: The compiletest test runner A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants